#include <stddef.h>
#include <time.h>
#ifndef N2LIB_MEMBER_SCAN_H_0F400853BE3351C1772153C7F4F3945F
#define N2LIB_MEMBER_SCAN_H_0F400853BE3351C1772153C7F4F3945F  1
#include "n2base.h"

struct n2libomemb_t {
    char *                  filename;
    char *                  membername;
    n2long_t                offset;
    n2long_t                size;
    time_t                  mdftime;                // the modify time
    bool                    is_inlib;               // this member from a library
    bool                    join;                   // this member will join into target library
    //////////////
    unsigned int            realindex;
    n2long_t                strtaboffs;             // the member name's offset in string table 
    n2long_t                liboffs;
    ////
    n2libomemb_t();
};

struct n2libomemblist_t
{
    n2libomemb_t *          list;
    unsigned                count;
    unsigned                alloc;
    ////
    n2libomemblist_t();
    size_t add(const char* membername, const char* filename, n2long_t offset, n2long_t size, time_t mtime, bool is_inlib);
    size_t addlib(const char* libfname);
    n2libomemb_t * get(unsigned index);
    void inc();
};
extern n2libomemblist_t  inmemlist;

void tidy_up_objlist(int flag);
int n2libmember_seek(FILE *fp, n2libomemb_t * member, n2ulong_t offset);


#endif  //N2LIB_MEMBER_SCAN_H_0F400853BE3351C1772153C7F4F3945F


